package com.nbsaas.boot;

public class Main {
    public static void main(String[] args) {
        EightBitPermission perm = new EightBitPermission();
        System.out.println("当前权限二进制: " + perm.getBinaryValue()); // 00000101

        perm.grantPermission(1); // 添加 bit0 权限
        System.out.println("当前权限二进制: " + perm.getBinaryValue()); // 00000101

        // 从已有二进制字符串创建权限
        EightBitPermission perm2 = new EightBitPermission("00101100");
        System.out.println("当前权限二进制：" + perm2.getBinaryValue()); // 00101100
    }
}
